const path=require("path"),{config}=require(path.join(__dirname,"/config.bundle")),$=require(path.join(__dirname,"/config.bundle"));module.exports=function(){document.querySelector(".delete__button").addEventListener("click",function(){const a=Object.keys($.files_).length,{active:b,list:c}=$._fs.getActiveList();0===b?0>=a?$._fs.createNotice("\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B"):1===config.FileDeleteNotice?(document.querySelector(".delfile__from-pop").style.display="flex",document.querySelector(".delfile__from-container").style.display="block"):($._fs.trashFiles($.files_),$.files_.length-=a):1===b&&(0>=Object.keys(c).length?$._fs.createNotice("\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B"):1===config.FileDeleteNotice?(document.querySelector(".delfile__from-pop").style.display="flex",document.querySelector(".delfile__from-container").style.display="block"):($._fs.trashFiles(c),$.files_.length-=a))}),document.querySelector(".apply__file-pop").addEventListener("click",function(){const a=Object.keys($.files_).length,{active:b,list:c}=$._fs.getActiveList();0===b?0>=a?$._fs.createNotice("\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B"):($._fs.trashFiles($.files_),$.files_.length-=a):1===b&&(0>=Object.keys(c).length?$._fs.createNotice("\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B"):($._fs.trashFiles(c),$.files_.length-=a))}),document.querySelector(".copy__button").addEventListener("click",function(){const a=Object.keys($.files_).length,{active:b,list:c}=$._fs.getActiveList();0===b?0>=a?$._fs.createNotice("\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B"):$._fs.copyFiles($.files_):1===b&&(0>=Object.keys(c).length?$._fs.createNotice("\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B"):$._fs.copyFiles(c))}),document.querySelector(".transfer__button").addEventListener("click",function(){const a=Object.keys($.files_).length,{active:b,list:c}=$._fs.getActiveList();0===b?0>=a?$._fs.createNotice("\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B"):($._fs.renameFiles($.files_),$.files_.length-=a):1===b&&(0>=Object.keys(c).length?$._fs.createNotice("\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B"):($._fs.renameFiles(c),$.files_.length-=a))})};
